package com.molichuxing.services.infrastructure.dao;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.molichuxing.framework.dao.RootMapper;
import com.molichuxing.services.infrastructure.bean.BlacklistBean;

/**
 * <p>
 * 黑名单表 Mapper 接口
 * </p>
 *
 * @author liyg
 * @since 2019-08-14
 */
public interface BlacklistMapper extends RootMapper<BlacklistBean> {

	/**
	 * 查询总条数
	 * 
	 * @param map
	 * @return
	 */
	long getBlacklistPageCount(Map<String, Object> map);

	/**
	 * 分页查询列表
	 * 
	 * @param map
	 * @param pageSize 
	 * @param pageNum 
	 * @return
	 */
	List<BlacklistBean> getBlacklistPage(@Param("params") Map<String, Object> map,@Param("pageNum") Integer pageNum,@Param("pageSize") Integer pageSize);

	/**
	 * 逻辑删除黑名单
	 * 
	 * @param bean
	 * @return
	 */
	int delete(BlacklistBean bean);

	/**
	 * 获取黑名单信息
	 * @param phone
	 * @return
	 */
	BlacklistBean getBlacklistByPhone(@Param("phone")String phone);

	/**
	 * 移除黑名单
	 * @param idNumber
	 * @param operationTime
	 * @return
	 */
	int modifyByIdNumber(@Param("idNumber")String idNumber,@Param("operationTime") LocalDateTime operationTime);

}
